package com.example.cdctestsystem.pojo;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

public class UserInfo implements Serializable {
    /**
	* 索引，自增长
	*/
    private Integer id;

    /**
	* 用户账号
	*/
    private String email;

    /**
	* 用户密码
	*/
    private String password;

    /**
	* 男，女
	*/
    private String sex;

    /**
	* 详细地址
	*/
    private String area;

    /**
	* 用户真实姓名
	*/
    private String userName;

    /**
	* 用户的出生日期
	*/

    private Date birthday;

    /**
	* 学历表
	*/
    private Education education;

    /**
	* 岗位表
	*/
    private Post post;

    /**
	* 用户联系方式
	*/
    private String phone;

    /**
	* 1为正常使用，0为注销账号
	*/
    private Boolean enable;

    /**
	* 0为普通用户，1为内测用户
	*/
    private Boolean vipUser;

    /**
	* 用户注册时间
	*/
    private Date creatTime;

    private String pic;

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public Education getEducation() {
        return education;
    }

    public void setEducation(Education education) {
        this.education = education;
    }

    public Post getPost() {
        return post;
    }

    public void setPost(Post post) {
        this.post = post;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public Boolean getVipUser() {
        return vipUser;
    }

    public void setVipUser(Boolean vipUser) {
        this.vipUser = vipUser;
    }

    public Date getCreatTime() {
        return creatTime;
    }

    public void setCreatTime(Date creatTime) {
        this.creatTime = creatTime;
    }

    public String getBirthday1() {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
        simpleDateFormat.format(this.getBirthday());
        return simpleDateFormat.format(this.getBirthday());
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", email=").append(email);
        sb.append(", password=").append(password);
        sb.append(", sex=").append(sex);
        sb.append(", area=").append(area);
        sb.append(", userName=").append(userName);
        sb.append(", birthday=").append(birthday);
        sb.append(", educationId=").append(education);
        sb.append(", postId=").append(post);
        sb.append(", phone=").append(phone);
        sb.append(", enable=").append(enable);
        sb.append(", vipUser=").append(vipUser);
        sb.append(", creatTime=").append(creatTime);
        sb.append(", pic=").append(pic);
        sb.append("]");
        return sb.toString();
    }
}